package com.mq.dialogdemo;

import android.content.Intent;
import android.support.v4.media.session.PlaybackStateCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.mq.dialogdemo.custom.CustomActivity;
import com.mq.dialogdemo.datepicker.DatePickerActivity;
import com.mq.dialogdemo.dialogfragment.DialogFragmentActivity;
import com.mq.dialogdemo.progressdialog.ProgressDialogActivity;
import com.mq.dialogdemo.timepicker.TimePickerActivity;

import java.sql.Time;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void btnClick(View view) {
        Intent intent = null;
        switch (view.getId()) {
            case R.id.btn_custom_view:
                intent = new Intent(this, CustomActivity.class);
                break;
            case R.id.btn_date:
                intent = new Intent(this, DatePickerActivity.class);
                break;
            case R.id.btn_time:
                intent = new Intent(this, TimePickerActivity.class);
                break;
            case R.id.btn_fragment:
                intent = new Intent(this, DialogFragmentActivity.class);
                break;
            case R.id.btn_progress:
                intent = new Intent(this, ProgressDialogActivity.class);
                break;
        }

        startActivity(intent);
    }
}
